//
//  UIButton+XJCategory.m
//  TranslateSoftware
//
//  Created by boniu on 2022/5/9.
//

#import "UIButton+XJCategory.h"

@implementation UIButton (XJCategory)

- (void)addTargetUpInside:(nullable id)target action:(SEL)action {
    
    [self addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}

- (void)setImageNormal:(UIImage *)image {
    
    [self setImage:image forState:UIControlStateNormal];
}

- (void)setTextNormal:(NSString *)text {
    
    [self setTitle:text forState:UIControlStateNormal];
}

- (void)setTextColorNormal:(UIColor *)color {
    
    [self setTitleColor:color forState:UIControlStateNormal];
}

- (void)setBackgroundImageNormal:(UIImage *)image {
    
    [self setBackgroundImage:image forState:UIControlStateNormal];
}

- (void)setTitleColorNormal:(UIColor *)color {
    
    [self setTitleColor:color forState:UIControlStateNormal];
}


- (void)setTitleFont:(UIFont *)font {
    
    self.titleLabel.font = font;
}

@end
